

.LC0:
	.string "%d"

.LC1:
	.string "非奇数"

.LC2:
	.string "a和b的差%d是奇数"


.globl main


main:
	pushq %rbp
	movq %rsp,%rbp
	subq $0x1000,%rsp

	movl $0,-0x1000(%rbp) /* a */
	movl $0,-0xffc(%rbp) /* b */
	movl $0,-0xff0(%rbp) /* diff */

	leaq -0x1000(%rbp),%rsi  /* a */
	leaq .LC0(%rip),%rdi
	movl $0,%eax 
	call scanf 

	leaq -0xffc(%rbp),%rsi /* b */
	leaq .LC0(%rip),%rdi
	movl $0,%eax 
	call scanf 

	movl -0x1000(%rbp),%eax /* a */
	subl -0xffc(%rbp),%eax /* b */
	movl %eax,-0xff0(%rbp) /* diff */

	movl %eax,%edi 
	call is_odd 

	testl %eax,%eax
	je .Lmain_400

	movl -0xff0(%rbp),%esi /* diff */
	leaq .LC2(%rip),%rdi 
	movl $0,%eax 
	call printf 

	jmp .Lmain_0

.Lmain_400:
	leaq .LC1(%rip),%rdi 
	movl $0,%eax 
	call printf 

.Lmain_0:
	movl $0,%eax
	leave
	ret

is_odd:
	pushq %rbp
	movq %rsp,%rbp
	subq $0x1000,%rsp

	movl %edi,-0x1000(%rbp) /* a */

	movl -0x1000(%rbp),%eax 
	movl $2,%ebx
	xorq %rdx,%rdx
	idivl %ebx
	testl %edx,%edx
	je  .Lis_odd_400
	movl $1,%eax
	jmp .Lis_odd_390 
.Lis_odd_400:
	movl $0,%eax 
.Lis_odd_390:
	leave
	ret
